class AddAttachToComments < ActiveRecord::Migration
  def self.up
    add_column :comments, :need_days,           :integer
    add_column :comments, :price,               :integer
    add_column :comments, :hidden,              :integer, :limit => 1, :default => 0
    add_column :comments, :attach_file_name,    :string
    add_column :comments, :attach_file_size,    :integer
    add_column :comments, :attach_content_type, :string
    add_column :comments, :attach_updated_at,   :datetime
  end

  def self.down
    remove_column :comments, :need_days
    remove_column :comments, :price
    remove_column :comments, :hidden
    remove_column :comments, :attach_file_name
    remove_column :comments, :attach_content_type
    remove_column :comments, :attach_file_size
    remove_column :comments, :attach_updated_at
  end
end
